import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'umplugin_method_channel.dart';

abstract class UmpluginPlatform extends PlatformInterface {
  /// Constructs a UmpluginPlatform.
  UmpluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static UmpluginPlatform _instance = MethodChannelUmplugin();

  /// The default instance of [UmpluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelUmplugin].
  static UmpluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [UmpluginPlatform] when
  /// they register themselves.
  static set instance(UmpluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

    Future<dynamic> initCommon(String androidAppkey, String iosAppkey, String channel, [String? pushSecret]) {
    throw UnimplementedError('initCommon() has not been implemented.');
  }

  void onEvent(String event, Map<String,dynamic> properties) {
    throw UnimplementedError('onEvent() has not been implemented.');
  }

  void onProfileSignIn (String userID) {
    throw UnimplementedError('onProfileSignIn() has not been implemented.');
  }

  void onProfileSignOff () {
    throw UnimplementedError('onProfileSignOff() has not been implemented.');
  }

  void setPageCollectionModeManual() {
    throw UnimplementedError('setPageCollectionModeManual() has not been implemented.');
  }

  void onPageStart(String viewName) {
    throw UnimplementedError('onPageStart() has not been implemented.');
  }

  void onPageEnd(String viewName) {
    throw UnimplementedError('onPageEnd() has not been implemented.');
  }

  void setPageCollectionModeAuto() {
    throw UnimplementedError('setPageCollectionModeAuto() has not been implemented.');
  }

  void reportError(String error) {
    throw UnimplementedError('reportError() has not been implemented.');
  }
}
